package com.s63.controller;

import com.s63.entity.AjaxResult;
import com.s63.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/depts")
public class DeptController {
    @Autowired
    private IDeptService deptService;

    @GetMapping
    public AjaxResult list() {
        return AjaxResult.ok(deptService.list());
    }
}
